<template>
  <div>
    <Header :config="config"></Header>
    <Navigation :config="config"></Navigation>
    <div class="banner">
      <img src="https://ys-cc.oss-cn-chengdu.aliyuncs.com/upload/20221118/b161442c8ac84bb59e058667ef481782.jpg" alt style="width: 100%;">
      <ul class="b-ul">
        <li class="bu-li" v-for="item in config.bannerData" :key="item.id">
          <a :href="item.href" class="bul-cover">
            <img :src="item.src" alt>
          </a>
          <div class="bul-text">
            <a :href="item.href" class="bult-a">{{ item.title }}</a>
          </div>
        </li>
      </ul>
    </div>
    <div class="wzyh-ranking">
      <form class="wr-center">
        <div class="wrc-problem">
          <div class="title">你真的知道你的网站为什么没有排名吗？</div>
          <div class="desc">网站没排名，一切等于零<br>纺扬网站建设免费网站优化诊断</div>
        </div>
        <div class="wrc-form">
          <input type="text" v-model="fullName" placeholder="您的名字" class="wrcf-input" />
          <input type="text" v-model="phone" maxlength="11" placeholder="您的电话" class="wrcf-input" />
        </div>
        <div class="wrc-form-btn">
          <button type="button" class="btn" :disabled="formDisabled" @click="formSave">免费网站诊断</button>
          <div class="arrow"></div>
        </div>
      </form>
    </div>
    <div class="wzyh-diagnosis">
      <div class="wd-title">企业网站诊断/关键词排名优化</div>
      <div class="wd-content">
        <div class="wdc-center">
          <img class="wdcc-cover" src="https://ys-cc.oss-cn-chengdu.aliyuncs.com/upload/20221104/ef3fe62dda4e41b5aa6c03c1def9232d.jpg" alt>
          <div class="wdcc-items">
            <dl class="wdcci-dl">
              <dt class="icon icon1"></dt>
              <dd class="label">
                <strong class="l-name">诊断</strong>
                <p class="l-desc">对网站进行全方位分析</p>
              </dd>
            </dl>
            <dl class="wdcci-dl">
              <dt class="icon icon2"></dt>
              <dd class="label">
                <strong class="l-name">反馈</strong>
                <p class="l-desc">对网站诊断结果的反馈，包括网站框架以及用户<br>对网站的一个喜厌度</p>
              </dd>
            </dl>
            <dl class="wdcci-dl">
              <dt class="icon icon3"></dt>
              <dd class="label">
                <strong class="l-name">优化</strong>
                <p class="l-desc">参照诊断的结果，对网站整体进行相对应的优化<br>从而提升网站的权重及关键词排名</p>
              </dd>
            </dl>
          </div>
        </div>
      </div>
    </div>
    <div class="wzyh-reason">
      <div class="wr-center">
        <div class="wrc-title">这就是客户选择我们的原因</div>
        <div class="wrc-swiper">
          <div class="swiper" id="mySwiper">
            <div class="swiper-wrapper">
              <div class="swiper-slide">
                <div class="wrcs-box">
                  <div class="wrcsb-words">
                    <div class="text">网站做了两年多优化，一直没有排名，后来经过<br>
                      纺扬网站建设 诊断优化后，网站排名大幅度提升，老<br>
                      板的心情也逐渐好了起来。换句话说，<span class="yellow">纺扬网站建设把数据<br>
                      真正的做到了极致</span></div>
                    <div class="author">某公司市场总监</div>
                  </div>
                  <img class="wrcsb-cover" src="https://ys-cc.oss-cn-chengdu.aliyuncs.com/upload/20221105/4a6d061e33a24621a30fd79a91ac88c9.jpg" alt>
                </div>
              </div>
              <!-- <div class="swiper-slide">
                <div class="wrcs-box">
                  <div class="wrcsb-words">
                    <div class="text">网站做了两年多优化，一直没有排名，后来经过<br>
                      纺扬网站建设 诊断优化后，网站排名大幅度提升，老<br>
                      板的心情也逐渐好了起来。换句话说，<span class="yellow">纺扬网站建设把数据<br>
                      真正的做到了极致</span></div>
                    <div class="author">某公司市场总监</div>
                  </div>
                  <img class="wrcsb-cover" src="https://ys-cc.oss-cn-chengdu.aliyuncs.com/upload/20221105/4a6d061e33a24621a30fd79a91ac88c9.jpg" alt>
                </div>
              </div>
              <div class="swiper-slide">
                <div class="wrcs-box">
                  <div class="wrcsb-words">
                    <div class="text">网站做了两年多优化，一直没有排名，后来经过<br>
                      纺扬网站建设 诊断优化后，网站排名大幅度提升，老<br>
                      板的心情也逐渐好了起来。换句话说，<span class="yellow">纺扬网站建设把数据<br>
                      真正的做到了极致</span></div>
                    <div class="author">某公司市场总监</div>
                  </div>
                  <img class="wrcsb-cover" src="https://ys-cc.oss-cn-chengdu.aliyuncs.com/upload/20221105/4a6d061e33a24621a30fd79a91ac88c9.jpg" alt>
                </div>
              </div> -->
            </div>
            <div class="swiper-pagination"></div>
            <div class="swiper-button-prev"></div>
            <div class="swiper-button-next"></div>
          </div>
        </div>
      </div>
    </div>
    <div class="wzyh-seo">
      <div class="ws-center">
        <div class="wsc-title">企业为什么一定要做SEO</div>
        <ul class="wsc-ul">
          <li class="wscu-li" v-for="item in seoData" :key="item.id">
            <div class="cover" :class="`icon${item.id}`"></div>
            <div class="title">{{ item.title }}</div>
            <div class="desc">{{ item.desc }}</div>
          </li>
        </ul>
      </div>
    </div>
    <div class="wzyh-reason">
      <div class="wr-center">
        <div class="wrc-title">选择纺扬网站建设3个额外的理由</div>
        <ul class="wrc-ul">
          <li class="wrcu-li">
            <img class="cover" src="https://ys-cc.oss-cn-chengdu.aliyuncs.com/upload/20221105/9352cf314b9f45b1a82178b913bcf088.jpg" alt>
            <div class="content">
              <div class="num">1</div>
              <div class="text">上词快、网站整体提升明显</div>
            </div>
          </li>
          <li class="wrcu-li">
            <img class="cover" src="https://ys-cc.oss-cn-chengdu.aliyuncs.com/upload/20221105/055af9bf2c964e5ea0c14f386ea9075c.jpg" alt>
            <div class="content">
              <div class="num">2</div>
              <div class="text">售后服务好，7X24小时<br>随呼随到</div>
            </div>
          </li>
          <li class="wrcu-li">
            <img class="cover" src="https://ys-cc.oss-cn-chengdu.aliyuncs.com/upload/20221105/c4dfa58a307248e1bd589b5591cc2490.jpg" alt>
            <div class="content">
              <div class="num">3</div>
              <div class="text">物超所值，价格远低于同行</div>
            </div>
          </li>
        </ul>
      </div>
    </div>
    <Footer :config="config"></Footer>
  </div>
</template>

<script>
export default {
  async asyncData(ctx) {
    // 设置导航选中
    ctx.config.navData[2].on = true

    return {
      config: ctx.config,
      seoData: [{
        id: 1,
        title: '网站引流',
        desc: '能带来大量精准流量的网站才是好网站，SEO优化可以为企业网站带来大量的有效流量'
      }, {
        id: 2,
        title: '更低的成本',
        desc: '企业线上免费推广的最重要的途径,没有之一，与竞价完美配合。'
      }, {
        id: 3,
        title: '同行都在做',
        desc: '大量订单被同行抢走，因为用户网络搜索到的永远只有同行'
      }, {
        id: 4,
        title: '24小时广告在线',
        desc: 'SEO排名24小时在线，任何时间都能让客户看到你'
      }, {
        id: 5,
        title: '低投入高收益',
        desc: '一次投入，享受长久的推广红利,维护好排名、持续产单'
      }, {
        id: 6,
        title: '提升品牌影响力',
        desc: '百度、360、搜狗、谷歌排名同步提升，实现全网首页霸屏'
      }, {
        id: 7,
        title: '比竞价广告更实惠',
        desc: '支出占比不足竞价广告的1%'
      }, {
        id: 8,
        title: '精准营销',
        desc: 'SEO属于搜索引擎营销，获取的流量更精准，能够给企业带来持续不断的优质营销订单'
      }]
    }
  },
  head() {
    return {
      title: 'SEO优化-专业网站优化推广公司-纺扬网站建设',
      meta: [
        { hid: 'description', name: 'description', content: '纺扬网站建设是一家专业搜索引擎排名优化公司,专注网站SEO/SEM优化,口碑SEO优化网络整合营销推广,关键词排名优化提升,推广引流,新站优化,整站优化。' },
        { hid: 'keywords', name: 'keywords', content: 'seo优化,网站优化,网站推广,网站优化公司,纺扬网站建设' }
      ],
      link: [
        { rel: 'stylesheet', href: '/css/swiper-bundle.min.css' }
      ],
      script: [
        { src: '/js/swiper-bundle.min.js' }
      ]
    }
  },
  data() {
    return {
      fullName: '',
      phone: '',
      weChat: '',
      demand: '',
      budget: '',
      content: '',
      formDisabled: false
    }
  },
  mounted() {
    new Swiper('#mySwiper', {
      loop: false,
      pagination: {
        el: '.swiper-pagination',
        bulletClass : 'my-bullet',
        bulletActiveClass: 'my-bullet-active',
        clickable: true
      },
      navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev'
      }
    })
  },
  methods: {
    // 表单提交
    formSave() {
      if (this.phone == '') {
        this.$message({
          message: '请输入您的电话号码',
          type: 'warning'
        })
        return false
      }
      if (!/^1[3456789]\d{9}$/.test(this.phone)) {
        this.$message({
          message: '您的号码格式有误',
          type: 'warning'
        })
        return false
      }
      this.formDisabled = true
      this.$axios({
        url: this.$store.state.addMessageBoard,
        method: 'POST',
        headers: {
          'Content-Type':'application/x-www-form-urlencoded'
        },
        params: {
          fullName: this.fullName,
          phone: this.phone,
          weChat: this.weChat,
          demand: this.demand,
          budget: this.budget,
          content: this.content,
          ip: this.config.ip,
          pathUrl: this.config.domain + this.$route.fullPath
        }
      }).then(({ data }) => {
        if (data.code == 200) {
          this.$message({
            message: data.msg,
            type: 'success'
          })
          this.fullName = ''
          this.phone = ''
          this.weChat = ''
          this.demand = ''
          this.budget = ''
          this.content = ''
          this.formDisabled = false
          return false
        }
        this.$message({
          message: data.msg,
          type: 'error'
        })
        this.formDisabled = false
      }).catch(err => {
        this.$message({
          message: err,
          type: 'error'
        })
        this.formDisabled = false
      })
      return false
    }
  }
}
</script>